Because of the potentially catastrophic consequences of data loss, many data storage systems are “mirrored.” In such systems, data sent by a host is stored both at a primary data storage system and at a remote data storage system, referred to herein as a “mirror system.” The redundant storage of data in this manner avoids data loss should the primary data storage system be destroyed.
The goal of a mirrored data storage system is to ensure that the data at the mirror system is at all times identical to the data at the primary data storage system. In an attempt to accomplish this, data is first stored in a cache at the primary data storage system. The primary data storage system then causes the data to be sent to the remote mirror system. Upon storing the data in its own cache, the remote mirror system sends the primary data storage system an acknowledgment. The primary data storage system them sends the host an acknowledgment. As a result, the host receives an acknowledgement only when the data is safely stored at both the primary and the remote systems.
In some cases, data sent to the primary data storage system becomes corrupted. For this reason, many data storage systems save a back-up copy of old data before overwriting it with new data. The primary data storage system then checks the integrity of the new data upon receiving that data. If the new data is found to be corrupted, the primary data storage system restores the old data and notifies the host that the attempt to overwrite the old data with new data failed. The host then makes another attempt to overwrite the old data with the new data.
When remote mirroring is implemented, it is possible for a mirroring event to occur while the corrupted data is still in the cache, before the host has had a chance to re-send the new data to the primary data storage system. If this occurs, then the corrupted data will be copied to the remote mirror system. The data at the primary data storage system and at the mirror system will thus diverge. This is contrary to the purpose of a mirrored data storage system. Should the primary data storage system be destroyed at this point, only the corrupted data at the remote mirror will be available.
In one aspect the invention includes a method for storing data by writing the data to a temporary storage location, buffering a mirror request to copy the data from the temporary location to a mirror, and then determining the validity of the data written to that temporary storage location. If the data is valid, a mirror request is sent for execution. If, on the other hand, the data is invalid, the buffer mirror request is deleted.
In one embodiment, writing of the data to a temporary storage location includes writing first and second portions of the data to respective first and second slots within the temporary storage location. This can include the additional step of buffering a mirror request for each of the first and second portions. In such a case, the invention can include sending all the buffered mirror requests for execution if the data is determined to be valid. Conversely, if the data is determined to be invalid, the invention can include deleting all the buffered mirror requests.
In another aspect, the invention includes a method for storing data by writing first and second portions of the data to respective first and second temporary storage locations. First and second mirror requests are then buffered. These mirror request are intended to copy the first and second portions from their respective storage locations to a mirror. The validity of the data is then determined. If the data is valid, the mirror requests are sent for execution. If, on the other hand, the data is invalid, the first and second mirror requests are deleted.
In another aspect, the invention includes a method for storing data by writing the data to a temporary storage location and buffering a mirror request for copying that data from the temporary storage location to a mirror. The data is then examined to determine if it is valid. If the data proves to be invalid, the mirror request is deleted.
Another aspect of the invention provides a method for storing data by writing first and second portions of the data to respective first and second temporary storage locations. First and second mirror requests are then buffered. These mirror requests are intended to copy the first and second portions from the first and second temporary storage locations to a mirror. The data is then examined to determine its validity. If the data proves to be invalid, the first and second mirror requests are deleted.
In another aspect, the invention includes a data storage system for storing data provided by a host. The system includes a host adaptor for communicating with the host, a cache memory in communication with the host adaptor for temporary storage of data, and a mirror queue for queuing mirror requests for copying selected data from the cache memory to a mirror. A holding pen accumulates mirror requests prior to sending the mirror requests to the mirror queue.
In one embodiment, the host adaptor includes a local memory and the holding pen is maintained in the local memory. However, in other embodiments a holding pen is maintained in the cache memory.
The invention optionally includes a remote adaptor configured to inspect the mirror queue and to copy selected data from the cache memory to a mirror in response to mirror requests queued therein.
Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. Although methods and systems similar or equivalent to those described herein can be used in the practice or testing of the present invention, suitable methods and systems are described below. All publications, patent applications, patents, and other references mentioned herein are incorporated by reference in their entirety. In case of conflict, the present specification, including definitions, will control. In addition, the materials, methods, and examples are illustrative only and not intended to be limiting.
Other features and advantages of the invention will be apparent from the following detailed description, and from the claims.